package com.esun.payment_api.service;

import com.esun.payment_api.bean.SumDkReceiveMoneyBean;
import com.esun.payment_api.dao.FkDraftDao;
import com.esun.payment_api.dao.FkDraftDetail;
import com.esun.payment_api.domain.FkDraft;
import com.esun.payment_api.domain.User;
import com.esun.payment_api.dto.FkDraftQueryParam;
import com.esun.payment_api.dto.PInvInsParam;
import com.esun.payment_api.dto.ProcessApprovalParam;
import com.esun.payment_api.dto.SubmitApprovalParam;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public interface FkDraftService {
    //根据Id软删除
    int deleteById(Integer id);

    //删除合同并且删除相关信息
    void deleteByIdStr(PInvInsParam param);

    //创建数据，并返回实体
    int insertReturnId(FkDraft fkDraft);

    //通过id获取汇票付款
    FkDraft selectByPrimaryKey(Integer id);

    //修改
    int update(FkDraft fkDraft);

    //通过id获取汇票付款详情信息
    FkDraftDetail getFkDetail(User user, Integer id);

    //根据汇票付款类型查询
    List<FkDraftDao> getListByType(FkDraftQueryParam queryParam, Integer pageSize, Integer pageNum);

    //按筛选条件，计算：已兑票据金额
    SumDkReceiveMoneyBean getSumMoneyBySearch(FkDraftQueryParam queryParam);

    //汇票付款申请提交审批
    void fkSubmitApproval(SubmitApprovalParam param);

    //被拒后重新提交审批
    void fkResubmitApproval(SubmitApprovalParam param);

    //发票申请流程审批 同意1 拒绝-1
    void fkProcessApproval(ProcessApprovalParam param);

    //校验汇票付款是否能提交
    String checkFkSubmit(Integer id);
}
